!!****f* ABINIT/ptg_D3
!!
!! NAME
!! ptg_D3
!!
!! FUNCTION
!!
!! COPYRIGHT
!! Copyright (C) 2010-2020 ABINIT group (MG)
!! This file is distributed under the terms of the
!! GNU General Public License, see ~abinit/COPYING
!! or http://www.gnu.org/copyleft/gpl.txt .
!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
!!
!! INPUTS
!!
!! OUTPUT
!!
!! PARENTS
!!      m_ptgroups
!!
!! CHILDREN
!!
!! SOURCE
!!
!********************************************************************************
! This include file has been automatically generated by the script ptg.py
! Do not edit! Change the script source instead.
!********************************************************************************

! Point group name  D3 (32)

#if defined HAVE_CONFIG_H
#include "config.h"
#endif

#include "abi_common.h"


module m_ptg_D3
contains
!!**



 subroutine ptg_D3 (nsym,nclass,sym,class_ids,class_names,Irr)
 use defs_basis
 use m_abicore
 use m_defs_ptgroups,  only : irrep_t
 implicit none
!Arguments ------------------------------------
 integer,intent(out) :: nclass,nsym 
 !arrays
 integer,allocatable,intent(out) :: sym(:,:,:), class_ids(:,:)
 character(len=5),allocatable,intent(out) :: class_names(:)
 type(irrep_t),allocatable,intent(out) :: Irr(:)
 !Local variables-------------------------------
 complex(dpc) :: j=(0.0_dp,1.0_dp) 
 ! ********************************************************************************
! List of symmetries packed in classes
 nsym = 6
 ABI_MALLOC(sym, (3,3,nsym))
 sym(:,:,1) = RESHAPE( (/1, 0, 0, 0, 1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,2) = RESHAPE( (/0, 1, 0, -1, -1, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,3) = RESHAPE( (/-1, -1, 0, 1, 0, 0, 0, 0, 1/) ,(/3,3/) )
 sym(:,:,4) = RESHAPE( (/0, -1, 0, -1, 0, 0, 0, 0, -1/) ,(/3,3/) )
 sym(:,:,5) = RESHAPE( (/-1, 0, 0, 1, 1, 0, 0, 0, -1/) ,(/3,3/) )
 sym(:,:,6) = RESHAPE( (/1, 1, 0, 0, -1, 0, 0, 0, -1/) ,(/3,3/) )

! Number of classes and corresponding indeces
 nclass = 3
 ABI_MALLOC(class_ids, (2,nclass))
 class_ids(1,1) = 1
 class_ids(2,1) = 1
 class_ids(1,2) = 2
 class_ids(2,2) = 3
 class_ids(1,3) = 4
 class_ids(2,3) = 6

ABI_MALLOC(class_names,(3))
 class_names(1) = "1+" 
 class_names(2) = "3+" 
 class_names(3) = "2+" 

! List of irreducible representations.
 ABI_DT_MALLOC(Irr, (3))
 Irr(1)%name = "A1"
 Irr(1)%dim = 1
 Irr(1)%nsym = 6
 ABI_MALLOC(Irr(1)%mat, (1,1,6))
 Irr(1)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,3) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,4) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,5) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(1)%mat(:,:,6) =  RESHAPE( (/1.0/), (/1, 1/) )

 Irr(2)%name = "A2"
 Irr(2)%dim = 1
 Irr(2)%nsym = 6
 ABI_MALLOC(Irr(2)%mat, (1,1,6))
 Irr(2)%mat(:,:,1) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,2) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,3) =  RESHAPE( (/1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,4) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,5) =  RESHAPE( (/-1.0/), (/1, 1/) )
 Irr(2)%mat(:,:,6) =  RESHAPE( (/-1.0/), (/1, 1/) )

 Irr(3)%name = "E"
 Irr(3)%dim = 2
 Irr(3)%nsym = 6
 ABI_MALLOC(Irr(3)%mat, (2,2,6))
 Irr(3)%mat(:,:,1) =  RESHAPE( (/1.0, 0.0, 0.0, 1.0/), (/2, 2/) )
 Irr(3)%mat(:,:,2) =  RESHAPE( (/-0.5+0.86603*j, 0*j, 0*j, -0.5-0.86603*j/), (/2, 2/) )
 Irr(3)%mat(:,:,3) =  RESHAPE( (/-0.5-0.86603*j, 0*j, 0*j, -0.5+0.86603*j/), (/2, 2/) )
 Irr(3)%mat(:,:,4) =  RESHAPE( (/0.0, 1.0, 1.0, 0.0/), (/2, 2/) )
 Irr(3)%mat(:,:,5) =  RESHAPE( (/0*j, -0.5+0.86603*j, -0.5-0.86603*j, 0*j/), (/2, 2/) )
 Irr(3)%mat(:,:,6) =  RESHAPE( (/0*j, -0.5-0.86603*j, -0.5+0.86603*j, 0*j/), (/2, 2/) )

 RETURN
  if (.FALSE.) write(std_out,*) j
 end subroutine ptg_D3 
!!***

end module m_ptg_D3
!!***
